@import '@material/button/mixins';
@import '../mdc-helpers/mdc-helpers';
@import '../../cdk/a11y/a11y';

@include mdc-button-without-ripple($query: $mat-base-styles-query);

$_mat-button-ripple-opacity: 0.1;

.mat-mdc-button {
  // The ripple element is created from the RippleRenderer rather than the MDC ripple, so it is
  // necessary to provide the color and opacity styling manually.
  .mat-ripple-element {
    opacity: $_mat-button-ripple-opacity;
    background-color: currentColor;
  }

  // Add an outline to make buttons more visible in high contrast mode. Stroked buttons
  // don't need a special look in high-contrast mode, because those already have an outline.
  @include cdk-high-contrast {
    &:not(.mdc-button--outlined) {
      outline: solid 1px;
    }
  }
}
